package cs5226;
import   java.util.Calendar;

public class GetCurrentTime {
	  int   year;   
	  int   month;   
	  int   date;   
	  int   hour;   
	  int   minute;   
	  int   second;   
	  Calendar c;
	  
	  public GetCurrentTime(){
		  c   =   Calendar.getInstance();
		 
	  }
	  
	  public Calendar getTime(){
		  return c;
	  }
	  
	  public int getyear(){
		  year   =   c.get(Calendar.YEAR); 
		  return year;
	  }
	  
	  public int getmonth() {
		  month   =   c.get(Calendar.MONTH)+1;   
		  return month;
	  }
	  
	  public int getdate() {
		  date   =   c.get(Calendar.DATE);
		  return date;
	  }
	  
	  public int gethour() {
		  hour   =   c.get(Calendar.HOUR);  
		  return hour;
	  }
	  
	  public int getminute() {
		  minute   =   c.get(Calendar.MINUTE); 
		  return minute;
	  }
	  
	  public int getsecond() {
		  second   =   c.get(Calendar.SECOND);
		  return second;
	  }
	  
}